#ifndef TRANSACTIONIO_H
#define TRANSACTIONIO_H
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;

class TransactionIO
{
public:

	/* Constructor for Transaction IO */
	TransactionIO(string path);

	/* Destructor for Transaction IO */
	~TransactionIO();

	/* Write Invoice Number to Text File */
	void newInvoiceNo(int invoiceNo);

	/* Write Entry Detail to Text File */
	void newEntry(string productID, int quantity, int unitPrice);

	/* Write Total Price & Transaction Time to Text File */
	void newSummary(int totalPrice, string transactionTime);

	/* Search and Print the Detail of Transaction by Invoice Number */
	void checkTransactionDetail(int invoiceNo);

	/* Return the Last Invoice Number */
	int getLastInvoiceNo();

private:
	string filePath;
	ofstream outputFileStream;

	/* Display Error Message for Transaction IO */
	void displayErrorMessage(string errorMsg);

};

#endif